In order to write data into any resistance-based memory, a direct current generally flows through the memory for a period of time. In order to save power, (for example with battery powered devices, or “green” devices) the amount of current and/or the length of time the current flows should be reduced. The current has to be strong enough to change the state of memory cells of the resistance based memory. The length of time the current is applied controls the probability the write is successful, with longer write operations increasing the probability of a successful write operation.